package com.xmall.mapper;

import com.xmall.bean.table.Category;
import com.xmall.bean.table.CategoryExample;
import com.xmall.bean.vo.CategoryLevelVO;
import com.xmall.bean.vo.CategoryVO;
import com.xmall.bean.vo.mallindex.FloorGoodsCategoryVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapper {
    long countByExample(CategoryExample example);

    int deleteByExample(CategoryExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    List<CategoryVO> selectByPid(Integer pid);

    List<Category> selectByExample(CategoryExample example);

    List<CategoryLevelVO> selectByLevel(String level);

    Category selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Category record, @Param("example") CategoryExample example);

    int updateCategoryInMall(CategoryVO categoryVO);

    int updateByExample(@Param("record") Category record, @Param("example") CategoryExample example);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    void deleteCategoryById(Integer id);

    void deleteCategoryByPid(Integer id);

    List<Category> selectByLevelForCategory(String l2);

    List<FloorGoodsCategoryVo> selectIdByLevel(@Param("level") String level);

    List<Integer> selectIdByPid(@Param("id") Integer id);


}